package com.huse.usermanager.controller;


import com.huse.commonutls.ApiResult;
import com.huse.usermanager.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统角色表 前端控制器
 * </p>
 *
 * @author xinxin
 * @since 2021-05-27
 */
@RestController
@CrossOrigin("*")
@RequestMapping("/usermanager/sys-role")
public class SysRoleController {
    @Autowired
    private SysRoleService sysRoleService;

    @GetMapping("/roleList")
    public ApiResult getRoleList(){
        return ApiResult.ok().data("roleList",sysRoleService.list(null));
    }
}

